[dbo].[asi_GetHandlingPrice]
SQLServer
>
iMIS1521GA
>
Stored Procedures
> dbo.asi_GetHandlingPrice
Properties
Parameters
SQL Script
Uses
Properties
Property
Value
ANSI Nulls On
Quoted Identifier On
Parameters
Name
Data Type
Max Length (Bytes)
@value
decimal(18,4)
9
@priceCode
int
4
SQL Script
CREATE
PROCEDURE
[dbo]
.
[asi_GetHandlingPrice]
@value
decimal
(
18
,
4
),
@priceCode
int
AS
--Attempt to retrieve an appropriate handling charge
SELECT
COALESCE
(
(
SELECT
TOP
1
hp.Price
FROM
HandlingPrice
hp
WHERE
hp.MinAmount
<=
@value
AND
hp.HandlingPriceCode
=
@priceCode
ORDER
BY
hp.MinAmount
DESC
),
-
1
)
GO
Uses
dbo